//
//  ZYRecordView.m
//  Tourism
//
//  Created by 张亚 on 16/2/21.
//  Copyright © 2016年 zhangya. All rights reserved.
//

#import "ZYRecordView.h"

@interface ZYRecordView ()
@property (nonatomic,strong) UIView * detailView;

@end

@implementation ZYRecordView

- (void)recordUserSport{
    
    self.detailView = [[UIView alloc]initWithFrame:self.bounds];
    self.detailView.backgroundColor = ZYColor;
    [self addSubview:self.detailView];
    
    UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame = CGRectMake(0, 30, 100, 50);
    btn.backgroundColor = [UIColor redColor];
    [btn setTitle:@"返回" forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(backBtnIsClick:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:btn];
//
//    UIImageView * imageView = [[UIImageView alloc]init];
//    imageView.frame = CGRectMake(0, 80, SCREEN_WIDTH, 220);
//    imageView.image = [UIImage imageNamed:@"插画1"];
//    [detailView addSubview:imageView];
//    
//    CGFloat textY = 310;
//    CGFloat textH = 50;
//    CGFloat padding = 10;
//    
//    UITextField * currentTF = [[UITextField alloc]init];
//    currentTF.frame = CGRectMake(10, textY, SCREEN_WIDTH - 20, textH);
//    currentTF.backgroundColor = [UIColor whiteColor];
//    NSDate * date = [NSDate date];
//    currentTF.textAlignment = NSTextAlignmentCenter;
//    NSString * curStr = [NSString stringWithFormat:@"当前时间：%@",date];
//    currentTF.text = curStr;
//    [currentTF reloadInputViews];
//    [detailView addSubview:currentTF];
//    
//    UITextField * continueTF = [[UITextField alloc]init];
//    continueTF.frame = CGRectMake(10, textY + (textH + padding), SCREEN_WIDTH - 20, textH);
//    continueTF.backgroundColor = [UIColor whiteColor];
//    continueTF.textAlignment = NSTextAlignmentCenter;
//    NSString * conStr = [NSString stringWithFormat:@"持续时间：%@",date];
//    continueTF.text = conStr;
//    [continueTF reloadInputViews];
//    [detailView addSubview:continueTF];
//    
//    UITextField * stepTF = [[UITextField alloc]init];
//    stepTF.frame = CGRectMake(10, textY + 2 * (textH + padding), SCREEN_WIDTH - 20, textH);
//    stepTF.backgroundColor = [UIColor whiteColor];
//    stepTF.textAlignment = NSTextAlignmentCenter;
//    NSString * stepStr = [NSString stringWithFormat:@"步数："];
//    stepTF.text = stepStr;
//    [stepTF reloadInputViews];
//    [detailView addSubview:stepTF];
//    
//    CGFloat startW = 100;
//    CGFloat startH = 100;
//    CGFloat startY = 520;
//    CGFloat startX = (SCREEN_WIDTH - startW) * 0.5;
//    UIButton * startBtn = [UIButton buttonWithType:UIButtonTypeCustom];
//    startBtn.frame = CGRectMake(startX, startY, startW, startH);
//    [startBtn setBackgroundImage:[UIImage imageNamed:@"go"] forState:UIControlStateNormal];
//    [startBtn setBackgroundImage:[UIImage imageNamed:@"go－按下"] forState:UIControlStateHighlighted];
//    [startBtn addTarget:self action:@selector(startBtnIsClick) forControlEvents:UIControlEventTouchUpInside];
//    [detailView addSubview:startBtn];
}
- (void) backBtnIsClick:(UIButton *)btn{
    [self.detailView removeFromSuperview];
}



@end
